1. Field of the Invention
The present invention relates generally to electronic communication. More specifically, the present invention relates to the dynamic compensation of host clocks.
2. Description of the Related Art
Universal Serial Bus (USB) protocol is a standard communications protocol for sending signals between devices and host controllers. USB has become the standard mechanism to communicate between computer devices, and is commonly used to link peripherals, such as keyboards, mice, external disk drives, etc. with personal computers. It is also quite commonly used to link various self-sufficient devices, such as cellular phones, portable media devices, etc. with personal computers.
USB 3.0, also known as SuperSpeed USB, is the latest iteration of the USB standard. It incorporates a “SuperSpeed” bus to achieve communication speeds of up to 5.0 Gb/s. Each side of a USB 3.0 link has a reference clock that is used to synchronize the communications over the link. The USB 3.0 architecture supports a separate reference clock source on each side of the link, but the accuracy of each clock is required to be within +/−300 ppm. In addition, all ports are required to have Spread Spectrum Clock (SSC) modulation. The maximum spread is +0/−5000 ppm. This gives a maximum possible frequency difference between the two devices of a link of +300 to −5300 ppm.
Even when the clocks on both side of the link are within these required tolerances, there is still a need to compensate for the frequency differences, lest the two clocks eventually get too far out of sync. The USB 3.0 spec provides for skip (SKP) symbols to be inserted in the data stream to compensate for these frequency differences. A SKP symbol is essentially a blank symbol used only to pad the data rate to allow the receiver to have additional symbols that can be dropped in order to compensate for differences in frequencies. Thus, if it turns out the host clock is faster than the peripheral device's clock, then the peripheral device can ignore a certain number of SKP symbols to compensate.
The USB 3.0 standard provides that the transmitter send out an average of one SKP ordered set every 354 symbols. Since the once every 354 symbols is only an average, the transmitter has the flexibility to wait to insert a SKP ordered set until a packet (of varying length) has completed, so as not to insert the symbols in the middle of a packet. An eight symbol (four ordered set) buffer is kept on the transmission side to hold the SKP symbols until the current packet has completed.
This solution works well for host/device combinations whose clock variance is within the tolerances provided by the USB 3.0 standard. However, the inventors of the present invention discovered that it is quite common for USB 3.0 hosts to fall outside of the standard specification, either due to design error or poor configurations. While operating USB 3.0 hosts or devices outside of the accepted standard is not an ideal situation, it is difficult if not impossible to control all the different hosts or devices sold by all the different integrated circuit manufacturers in the industry.
What is needed is a solution that allows for non-compliant USB 3.0 hosts or devices to operate properly when reference clocks on either end of the link fall outside of prescribed tolerance levels.